package collections.lecture19;

import java.util.TreeSet;

public class Example0 {
    public static void main(String[] args){
        TreeSet<User> set = new TreeSet<>(new AgeComparator());
        set.add(new User(25, "Mike"));
        set.add(new User(18, "Sara"));
        set.add(new User(45, "John"));
        System.out.println(set);
    }

}
